tr("There was an error while accessing the configuration "
"file at %1. Please make sure the file can be accessed by your system account.")
.arg(ConfigFile().configFile()),
- tr("Quit %1").arg(Theme::instance()->appNameGUI()));
+ QMessageBox::Ok
+ );
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
}
void EditLocallyManager::showErrorNotification(const QString &message,
const QString &informativeText)
{
- Systray::instance()->showMessage(message, informativeText, Systray::MessageIcon::Critical);
+ Systray::instance()->showMessage(message, informativeText, Systray::MessageIcon::Critical);
}
void EditLocallyManager::showErrorMessageBox(const QString &message,
if (QDir(_destination).mkdir(ui->newFolderNameEdit->text())) {
Q_EMIT folderCreated(fullPath);
} else {
- QMessageBox::critical(this, tr("Error"), tr("Could not create a folder! Check your write permissions."));
+ QMessageBox::critical(this, tr("Error"), tr("Could not create a folder! Check your write permissions."), QMessageBox::Ok);
}
QDialog::accept();
QMessageBox::critical(
nullptr,
QObject::tr("Failed to create debug archive"),
- QObject::tr("Could not create debug archive in selected location!")
+ QObject::tr("Could not create debug archive in selected location!"),
+ QMessageBox::Ok
);
return false;
}
void warnSystray()
{
- QMessageBox::critical(nullptr, qApp->translate("main.cpp", "System Tray not available"),
+ QMessageBox::critical(
+ nullptr,
+ qApp->translate("main.cpp", "System Tray not available"),
qApp->translate("main.cpp", "%1 requires on a working system tray. "
"If you are running XFCE, please follow "
"<a href=\"http://docs.xfce.org/xfce/xfce4-panel/systray\">these instructions</a>. "
"Otherwise, please install a system tray application such as \"trayer\" and try again.")
- .arg(Theme::instance()->appNameGUI()));
+ .arg(Theme::instance()->appNameGUI()),
+ QMessageBox::Ok
+ );
}
int main(int argc, char **argv)
Q_ASSERT(rec.isValid());
if (!account->e2e() || account->e2e()->_mnemonic.isEmpty()) {
- const int ret = QMessageBox::critical(nullptr,
- tr("Failed to encrypt folder at \"%1\"").arg(fileData.folderRelativePath),
- tr("The account %1 does not have end-to-end encryption configured. "
- "Please configure this in your account settings to enable folder encryption.").arg(account->prettyName()));
+ const int ret = QMessageBox::critical(
+ nullptr,
+ tr("Failed to encrypt folder at \"%1\"").arg(fileData.folderRelativePath),
+ tr("The account %1 does not have end-to-end encryption configured. "
+ "Please configure this in your account settings to enable folder encryption.").arg(account->prettyName()),
+ QMessageBox::Ok
+ );
Q_UNUSED(ret)
return;
}
job->setParent(this);
connect(job, &OCC::EncryptFolderJob::finished, this, [fileData, job](const int status) {
if (status == OCC::EncryptFolderJob::Error) {
- const int ret = QMessageBox::critical(nullptr,
- tr("Failed to encrypt folder"),
- tr("Could not encrypt the following folder: \"%1\".\n\n"
- "Server replied with error: %2").arg(fileData.folderRelativePath, job->errorString()));
+ const int ret = QMessageBox::critical(
+ nullptr,
+ tr("Failed to encrypt folder"),
+ tr("Could not encrypt the following folder: \"%1\".\n\n"
+ "Server replied with error: %2").arg(fileData.folderRelativePath, job->errorString()),
+ QMessageBox::Ok
+ );
Q_UNUSED(ret)
} else {
const int ret = QMessageBox::information(nullptr,